home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / CLPMOUSE.ARJ / DEMO.PRG < prev    next >
Text File  |  1991-01-21  |  3KB  |  117 lines

  1. * Demonstration of clipper Windows *
  2. * Public Domain
  3.  
  4. ****
  5. **** PUBLIC DECLARATION
  6. ****
  7. public SYDAT,COLOR1,COLOR2,COLOR3,COLOR4,COLOR5,COLOR6,COLOR7,COLOR8,COLOR9,COLORA
  8. public ESCP
  9.  
  10.    color1 = "0 +/77/03/30/60/6"
  11.    color2 = "7 +/1"
  12.    color3 = "2 +/4"
  13.    color4 = "2 +/0"
  14.    color5 = "3 +/6"
  15.    color6 = "3 +/5"
  16.    color7 = "7 +/0"
  17.    color8 = "0  /3"
  18.    color9 = "6 +/4"
  19.    colorA = "W+ /N"
  20.  
  21. sydat = date()
  22. @ 24,70 say SYDAT
  23. set color to (colorA)
  24. WININIT("WINFIL.WIN",.T.)
  25. WINBACK(chr(177))
  26. setcursor(0)
  27. sysrun = .t.
  28. do while sysrun
  29.    setcolor(color1)
  30.    DEMOS()
  31. enddo
  32. winclose()   /* that background screen ! */
  33. WINDONE()
  34. setcursor(1)
  35. return   
  36.  
  37.  
  38.  
  39. FUNCTION DEMOS
  40. fast = .f.
  41. a = 3
  42. b = 3
  43. c = 5
  44. d = 30
  45. m = 1
  46. for x = 1 to 3
  47.     if m > 9
  48.        m = 1
  49.     endif
  50.     nvar = "COLOR"+alltrim(str(m))
  51.     nvar = &nvar
  52.     setcolor(nvar)
  53.     arr = {"TEST","OF","THE","ARRAY"}
  54.     winopen(a,b,3,3,fast,alltrim(str(x)),nvar)
  55.     sizecnt1 = 3
  56.     sizecnt2 = 3
  57.     do while sizecnt1 < c .or. sizecnt2 < d
  58.        do case
  59.           case sizecnt1 < c .and. sizecnt2 < d
  60.                sizecnt1 = sizecnt1+1
  61.            sizecnt2 = sizecnt2+1
  62.            winsize(1,1)  /* default omitted, so its true */
  63.       case sizecnt1 < c .and. sizecnt2 = d
  64.            sizecnt1 = sizecnt1+1
  65.            winsize(1,0,.T.)
  66.       case sizecnt1 = c .and. sizecnt2 < d
  67.            sizecnt2 = sizecnt2+1
  68.            winsize(0,1)
  69.        endcase
  70.     enddo       
  71.     ret = winachoice("arr,.t.")
  72.     winsay(1,1,ret)
  73.     winopen(a,b,c,d,fast,alltrim(str(x)),nvar)
  74.     winsay(1,1,-1.22*(a+b+c+d),"@)")
  75.     winsay(2,2,"This is the SECOND LINE")
  76.     winsay(3,3,"This is the THIRD LINE")
  77.     winsay(4,4,"This is the FOURTH LINE")
  78.        first_time = .t.
  79.        o = 0
  80.        for n = 1 to 5 step 2
  81.            winmove(n,o)
  82.        wincolor(n+8)
  83.        if first_time
  84.           winmoveto(15,75,8)
  85.           winsize(-2,-3,.t.)
  86.           first_time = .f.
  87.        endif
  88.        xxx = inkey(2)
  89.        o = o+1
  90.        next
  91.     a = a+2
  92.     b = b+3
  93.     c = c+2
  94.     d = d+3
  95.     m = m+1
  96. next
  97. for x = 1 to 6
  98.     winclose()
  99.     inkey(2)
  100. next
  101. win_sgraph(0,0,1,color5,5,5,10,"Small")
  102. for x = 1 to 100
  103.     win_sgraph(100,x,2,color5)
  104. next
  105. win_sgraph(0,0,1,color6,10,15,30,"Medium")
  106. for x = 1 to 200
  107.     win_sgraph(300,x,2,color6)
  108. next
  109. win_sgraph(0,0,1,color1,15,2,70,"Large")
  110. for x = 1 to 300
  111.     win_sgraph(600,x,2,color1)
  112. next
  113. win_sgraph(0,0,3)             // Graphs are windows, so they can be stored
  114. winclose(wintotal()-1)
  115. sysrun = .f.
  116. return(NIL)
  117.